package com.itheima.mm.controller;

import com.itheima.mm.entity.Result;
import com.itheima.mm.pojo.Industry;
import com.itheima.mm.service.IndustryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/industry")
public class IndustryController {
    @Autowired
    private IndustryService industryService;
    @GetMapping("/findListAll")
    public Result findListAll(){

        List<Industry> industryList=industryService.findListAll();
        return new Result(true,"获取成功",industryList);
    }
}
